#ifndef HANDSHAKE_HANDLER_HPP
#define HANDSHAKE_HANDLER_HPP

#include <string>
#include <crypto++/sha.h>

class handshake_handler
{
public:
    handshake_handler(const std::string& server_origin, const std::string& server_location);

    std::string handle_shake(const std::string& handshake);

private:
    std::string _server_origin;
    std::string _server_location;
    CryptoPP::SHA1 _sha;

    std::string handle_shake_06(const std::string& handshake);
    std::string base64_encode(const unsigned char*, unsigned int);
    std::string get_handshake_line(const std::string& message, const std::string& header);
};

#endif // HANDSHAKE_HANDLER_HPP
